Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

192
Views
Handling "export X from 'Y'" when generating d.ts files

I am using TypeScript to generate d.ts files from our existing JavaScript codebase which is annotated using JSDoc, as per https://www.typescriptlang.org/docs/handbook/declaration-files/dts-from-js.html.

My problem is that the TS compiler (understandably) cannot handle some non-TS syntax which otherwise is parseable using Babel, specifically export x from 'y', e.g.

export { something } from './somewhere';

This yields the following when emitting types:

app/utils/index.js:76:1 - error TS1128: Declaration or statement expected.

76 export { something } from './somewhere';

I have tried adding the ts-ignore annotation, but it does not seem to work (I am using TS 4.5). I get the same error as above.

// @ts-ignore
export { something } from './somewhere';

Apart from removing this syntax (which is not feasible since we use it a lot), what would be the preferred way of solving this?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!